home *** CD-ROM | disk | FTP | other *** search
/ CD Concept 6 / CD Concept 06.iso / mac / UTILITAIRE / RLaB / rlib / isnan.r < prev    next >
Text File  |  1994-02-21  |  365b  |  16 lines

  1. //-------------------------------------------------------------------//
  2.  
  3. //  Syntax:    isnan ( X )
  4.  
  5. //  Description:
  6.  
  7. //  Isnan returns a matrix the same size as X containing zeros and
  8. //  ones. The ones locate the values in X that are NaNs.
  9.  
  10. //-------------------------------------------------------------------//
  11.  
  12. isnan = function ( X )
  13. {
  14.   return ! ( X == X );
  15. };
  16.